//
//  StreamHandler.m
//  Runner
//
//  Created by FXY on 2023/4/10.
//

#import "StreamHandler.h"

@implementation StreamHandler

- (FlutterError *)onListenWithArguments:(id)arguments
                             eventSink:(FlutterEventSink)events {
    self.eventSink = events;
    return nil;
}

- (FlutterError *)onCancelWithArguments:(id)arguments {
    return nil;
}

- (void)sendEvent:(NSString *)event {
    if (self.eventSink) {
        self.eventSink(event);
    }
}

@end
